import { defineConfig, loadEnv } from 'vite';
import viteCompression from 'vite-plugin-compression';
import uni from '@dcloudio/vite-plugin-uni';

//环境变量
const ENV = loadEnv('', process.cwd());

// https://vitejs.dev/config/
export default defineConfig({
	server: {
		open: '/',
		host: ENV.VITE_HOST,
		port: 3000,
		strictPort: true
	},
	plugins: [uni(), viteCompression()]
});
